package top.xiesen.collection;

import java.util.HashMap;
import java.util.Map;

/**
 * 测试Map方法
 * @author Allen
 *
 */
public class TestMap {

	public static void main(String[] args) { 
		Map map = new HashMap();
		map.put("李四", new Wife("张曼玉"));
		map.put("张三", new Wife("杨幂"));
		
		Wife w = (Wife)map.get("李四");
		System.out.println(w.name);
//		map.remove("李四");
//		System.out.println(map.size());
	}
}



class Wife{

	String name;
	public Wife(String name){
		this.name = name;
	}
}
